var D = D ? D : {};
//只能輸入數字
D.isNumberKey = function (evt) {
    var charCode = (evt.which) ? evt.which : event.keyCode;
    if (charCode > 31 && (charCode < 48 || charCode > 57)) {
        return false;
    } else {
        return true;
    }
};

//发送ajax时候加载load
$(document).ajaxStart(function () {
    //startLoad();
}).ajaxStop(function () {
    //endLoad();
}).ajaxError(function (a, b, e) {
    throw e;
});

function startLoad ()
{
    window.layer_load = layer.load(1, {
        shade: [0.2, '#000000'] //0.1透明度的白色背景
    });
}

function endLoad ()
{
    layer.close(window.layer_load);
}
